function [ G ] = SPD_GM_alternative( A,B,t )
% Alternative function to calculate the geometric mean

N = size(A,1);

Z = zeros(N);
if (A==Z)
   G = Z;
else
        
R_A = chol(A);
R_B = chol(B);

R_A_ = inv(R_A);

V = (R_A_')*B*R_A_;

[U,D] = schur(V);

G = R_B'*U*(D^t)*U'*R_B;
        
end

end

